package com.heima.wemedia.service.impl;


import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.heima.model.common.dtos.ResponseResult;
import com.heima.model.wemedia.pojos.WmChannel;
import com.heima.wemedia.mapper.WmChannelMapper;
import com.heima.wemedia.service.IWmChannelService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * <p>
 * 频道信息表 服务实现类
 * </p>
 *
 * @author chana
 * @since 2024-08-15
 */
@Service
public class WmChannelServiceImpl extends ServiceImpl<WmChannelMapper, WmChannel> implements IWmChannelService {

    @Resource
    private WmChannelMapper wmChannelMapper;

    /**
     * 查询所有频道
     * @return
     */
    @Override
    public ResponseResult channels() {
        List<WmChannel> wmChannels = wmChannelMapper.selectList(null);
        return ResponseResult.okResult(wmChannels);
    }
}
